namespace CShipBasic.generic;

/// <summary>
/// 泛型类定义
/// </summary>
/// <typeparam name="T"></typeparam>
public class GenericClass<T>
{
    public GenericClass(){}
    
    /// <summary>
    /// 泛型有参构造函数
    /// </summary>
    /// <param name="t"></param>
    public GenericClass(T t)
    {
        Console.WriteLine("当前传入的泛型类型参数为：{0}", t);
    }

    /// <summary>
    /// 泛型方法定义
    /// </summary>
    /// <param name="param"></param>
    /// <typeparam name="T"></typeparam>
    public void Show<T>(T param)
    {
        Console.WriteLine("该泛型方法的参数为：{0}", param);
    }
}